package com.thread;

/**
 * @author :admin
 * @description: Thread create by extends Thread
 * @create date: 2019/4/3 10:47
 */
public class ThreadDemoCreate extends Thread {
    public ThreadDemoCreate(String name) {
        super(name);
    }

    public static void main(String[] args) {
        Thread t = new ThreadDemoCreate("ThreadA");
        Thread tb = new ThreadDemoCreate("ThreadB");
        Thread tc = new ThreadDemoCreate("ThreadC");
        Thread td = new ThreadDemoCreate("ThreadD");
        t.start();
        tb.start();
        tc.start();
        td.start();
    }

    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
            System.out.println(i + " current thread run name :" + currentThread().getName());
        }
    }
}
